package com.hrserviceserve.dao;

import com.hrserviceserve.entity.Transfer;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface TransferRepository extends JpaRepository<Transfer,Integer> {
    @Query(value = "select * from transfer where if(?1!='',personnel_id=?1,1=1)",nativeQuery = true)
    Page<Transfer> findAllWhere(Integer id, Pageable pageable);
}
